import request from '@/utils/request'
import {ref} from 'vue'
export default () => {
	const myPappts=ref([])
	const storePAppointment = async (data) => {
		await request.post(`mini/personalapt`,data)
	}
	const cancelPAppointment = async (id) => {
		await request.get(`mini/personalapt/${id}/cancel`)
	}
	
	const getMyPapt = async ()=>{
		myPappts.value = await  request.get("mini/personalapt/my")
	}
	return {
		storePAppointment,
		cancelPAppointment,
		getMyPapt,
		myPappts
	}
}